#! /usr/bin/env python  
PKG = "create_node"
import roslib;roslib.load_manifest(PKG)

from dynamic_reconfigure.parameter_generator import *

gen = ParameterGenerator()

gen.add("update_rate", double_t, 0, "Polling rate for the irobot create.", 30.0, 5.0, 30.0 )

drive_mode = gen.enum([ gen.const("twist", str_t, "twist", "Takes a geometry_msgs/Twist message and is navigation compatible."),
               gen.const("turtle", str_t, "turtle", "Takes a create_node/Turtle message and is turtlesim compatible."),
               gen.const("drive", str_t, "drive", "Takes a create_node/Drive message which drives the TurtleBot as described in the iRobot Create manual.")],"")

gen.add("drive_mode", str_t, 0, "The possible drive modes (twist, turtle, drive).", "twist", edit_method = drive_mode)

gen.add("cmd_vel_timeout", double_t, 0, "How long to wait before timing out on a velocity command..", 0.6, 0.0, 1.0)

gen.add("stop_motors_on_bump", bool_t, 0, "Stops motors when the bumps sensor is hit.", True)

gen.add("has_gyro", bool_t, 0, "Enables or disables the gyro.", True)

gen.add("gyro_scale_correction", double_t, 0, "Scaling factor for correct gyro operation.", 1.35, 0.0, 6.0)

gyro_enum = gen.enum([ gen.const("ADXRS613", double_t, 150.0, "ADXRS613 150deg/s"), 
	                  gen.const("ADXRS652", double_t, 250.0, "ADXRS652 250deg/s"), 
	                  gen.const("ADXRS642", double_t, 300.0, "ADXRS642 300deg/s") ], 
	                  "Gyro Options") 

gen.add("gyro_measurement_range", double_t, 0, "Measurement range supported by gyro.", 150.0, 0.0, 300.0, edit_method=gyro_enum) 

gen.add("odom_angular_scale_correction", double_t, 0, "A correction applied to the computation of the rotation in the odometry.", 1.0, 0.0, 3.0)

gen.add("odom_linear_scale_correction", double_t, 0, "A correction applied to the computation of the translation in odometry.", 1.0, 0.0, 3.0)

gen.add("min_abs_yaw_vel", double_t, 0, "Minimum angular velocity of the TurtleBot.", None, 0.0, 3.0)
gen.add("max_abs_yaw_vel", double_t, 0, "Maximum angular velocity of the TurtleBot.", None, 0.0, 3.0)

exit( gen.generate(PKG, "TurtleBot", "TurtleBot"))
